//
//  MVCollectionList.m
//  __PRODUCTNAME__
//
//  Created by Hanlingyu on 16/08/15
//  Copyright (c) ltq. All rights reserved.
//

#import "MVCollectionList.h"
#import "MVSingers.h"

@implementation MVCollectionList

+ (NSDictionary *)objectClassInArray{
    return @{@"singers" : [MVSingers class]};
}

- (void)setValue:(id)value forKey:(NSString *)key {
    
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"singers"]) {
        NSMutableArray<MVSingers *> *singersArr = [NSMutableArray array];
        for (NSDictionary *dict in value) {
            MVSingers *mvSingers = [MVSingers modelWithDict:dict];
            [singersArr addObject:mvSingers];
        }
        _singers = singersArr;
    }
}

@end
